package com.example.springboot.bean;

import org.springframework.stereotype.Component;

@Component
public class AutowiredBean {
    private int id;
    private String name;
    public AutowiredBean() {
        System.out.println("无参构造函数");
        this.id = 1;
        this.name = "张三";
    }
    public AutowiredBean(int id, String name) {
        System.out.println("全参构造函数");
        this.id = id;
        this.name = name;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
}
